package cn.iocoder.yudao.module.ai.dal.mysql.datasetreleasefile;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.ai.dal.dataobject.datasetreleasefile.DatasetReleaseFileDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.ai.controller.admin.datasetreleasefile.vo.*;

/**
 * 数据集解压缩文件列 Mapper
 *
 * @author 侯俊青
 */
@Mapper
public interface DatasetReleaseFileMapper extends BaseMapperX<DatasetReleaseFileDO> {

    default PageResult<DatasetReleaseFileDO> selectPage(DatasetReleaseFilePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<DatasetReleaseFileDO>()
                .eqIfPresent(DatasetReleaseFileDO::getDatasetId, reqVO.getDatasetId())
                .eqIfPresent(DatasetReleaseFileDO::getFileBizType, reqVO.getFileBizType())
                .eqIfPresent(DatasetReleaseFileDO::getFileType, reqVO.getFileType())
                .likeIfPresent(DatasetReleaseFileDO::getFileOriginalName, reqVO.getFileOriginalName())
                .eqIfPresent(DatasetReleaseFileDO::getFileUploadPath, reqVO.getFileUploadPath())
                .eqIfPresent(DatasetReleaseFileDO::getMarkFileId, reqVO.getMarkFileId())
                .eqIfPresent(DatasetReleaseFileDO::getMarkFileId, reqVO.getMarkFileId())
                .eqIfPresent(DatasetReleaseFileDO::getMarkFileUploadPath, reqVO.getMarkFileUploadPath())
                .likeIfPresent(DatasetReleaseFileDO::getMarkFileOriginalName, reqVO.getMarkFileOriginalName())
                .eqIfPresent(DatasetReleaseFileDO::getMarkFileSize, reqVO.getMarkFileSize())
                .eqIfPresent(DatasetReleaseFileDO::getDuration, reqVO.getDuration())
                .eqIfPresent(DatasetReleaseFileDO::getQualityStatus, reqVO.getQualityStatus())
                .eqIfPresent(DatasetReleaseFileDO::getFileSize, reqVO.getFileSize())
                .eqIfPresent(DatasetReleaseFileDO::getSortNum, reqVO.getSortNum())
                .betweenIfPresent(DatasetReleaseFileDO::getCreateTime, reqVO.getCreateTime())
                .orderByAsc(DatasetReleaseFileDO::getSortNum));
    }

}